<!doctype html>
<html>

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <title>pickr.js</title>
  <!-- <link rel="stylesheet" href="http://cdn.bootstrapmb.com/bootstrap/4.1.1/css/bootstrap.min.css"> -->
  <link href="./pickr.min.css" rel="stylesheet" type="text/css">
  <style>
    .container {
      margin: 150px auto
    }
  </style>
</head>

<body>
  <div class="container">
    <h1>点击取色</h1>
    <div class="example"></div>
  </div>
  <script src="./pickr.min.js"></script>
  <script>
    const pickr = new Pickr({
      el: '.example',
      default: '#ffffff',
      components: {
        preview: true,
        opacity: true,
        hue: true,
        output: {
          hex: true,
          rgba: true,
          hsva: true,
          input: true
        },
      },
    });
  </script>
</body>

</html>